import request from "@/utils/request";

// 新增记录
export function addNewOne(data) {
  return request({
    url: "/v2/workJobApi/termAttendanceGroup",
    method: "POST",
    data: data
  });
}

// 分页条件查询
export function pageData(params) {
  return request({
    url: "/v2/workJobApi/termAttendanceGroup",
    method: "GET",
    params
  });
}

// 批量删除
export function multiDelete(ids) {
  return request({
    url: "/v2/workJobApi/termAttendanceGroup",
    method: "DELETE",
    data: ids
  });
}

// 修改内容
export function updateV2(data) {
  return request({
    url: "/v2/workJobApi/termAttendanceGroup",
    method: "PUT",
    data
  });
}

// 单独修改状态
export function changeStatus(data) {
  return request({
    url: "/v2/workJobApi/termAttendanceGroup/change",
    method: "PUT",
    data
  });
}

// 新增考勤规则
export function addOrUpdateRules(data) {
  return request({
    url: "/v2/workJobApi/termAttendanceGroup/rules",
    method: "POST",
    data
  });
}

// 查询所有考勤规则
export function ruleRecords() {
  return request({
    url: "/v2/workJobApi/termAttendanceGroup/rules",
    method: "GET"
  });
}

// 考勤组可选项
export function options() {
  return request({
    url: "/v2/workJobApi/termAttendanceGroup/options",
    method: "GET"
  });
}
